package com.siwei.mes.entity.experiment.concrete.batch;

import com.alibaba.fastjson.JSONObject;
import com.siwei.mes.common.util.JsonUtils;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @Description: 抗压强度
 * @Version: 1.0
 * @author: chenmaolin
 * @date: 2023/12/21 22:29
 */
@Data
public class ConcreteKyqd {
    @ApiModelProperty(value = "试件尺寸")
    private String sjcc = "";


    @ApiModelProperty(value = "7天平均值")
    private String pjz7d = "";

    @ApiModelProperty(value = "7天折算系数")
    private String zsxs7d = "";

    @ApiModelProperty(value = "7天富余系数")
    private String fyxs7d = "";


    @ApiModelProperty(value = "28天平均值")
    private String pjz28d = "";

    @ApiModelProperty(value = "28天折算系数")
    private String zsxs28d = "";

    @ApiModelProperty(value = "28天富余系数")
    private String fyxs28d = "";

    /**
     * 字符串转成对象 然后再转成json
     *
     * @param object
     * @return
     */
    private static JSONObject toJsonObject(Object object) {
        ConcreteKyqd entity = new ConcreteKyqd();
        if (object == null) {
            return JsonUtils.beanToObject(entity);
        }
        if (object instanceof String) {
            entity = JsonUtils.getObject((String) object, ConcreteKyqd.class);
        } else if (object instanceof JSONObject) {
            entity = JsonUtils.getObject((JSONObject) object, ConcreteKyqd.class);
        }
        return JsonUtils.beanToObject(entity);
    }

    public static void main(String[] args) {
        System.out.println(toJsonObject(null));
    }
}
